package com.bitcommunity.json;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @ClassName Json
 * @Description
 * @date 2023/11/16 19:28
 * @Author Squareroot_2
 */
@Data
@AllArgsConstructor
public class Json {
    int code;
    String message;
    Object data;

    public static Json json(int code, String message, Object data) {
        return new Json(code, message, data);
    }

    public static Json success(Object data){
        return json(0,"succeed",data);
    }
}
